package com.study.controller;


import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.xml.ws.spi.http.HttpContext;

import org.apache.ibatis.session.RowBounds;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpRequest;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.study.model.JqGridModel;
import com.study.model.Person;
import com.study.model.User;
import com.study.service.IPersonService;
@Controller
@RequestMapping("/personController")
public class PersonController {
	 	private IPersonService personService;
	    
	    public IPersonService getPersonService() {
	        return personService;
	    }

	    @Autowired
	    public void setPersonService(IPersonService personService) {
	        this.personService = personService;
	    }

	    @RequestMapping("/showPerson")
	    public String showPersons(Model model,String test){
	        List<Person> persons = personService.loadPersons();
	        model.addAttribute("persons", persons);
	        
	        return "show/showInfo";
	    }
	    
	    
}
